namespace TerritoryGame.Application.Dtos;

/// <summary>
/// 房间排行榜条目
/// </summary>
public class RoomLeaderboardEntry
{
    public Guid PlayerId { get; set; }
    public double Score { get; set; }
    public int Rank { get; set; }
}

/// <summary>
/// 游戏房间信息
/// </summary>
public class GameRoomInfo
{
    public string Id { get; set; } = string.Empty;
    public string RoomName { get; set; } = string.Empty;
    public int MaxPlayers { get; set; }
    public int CurrentPlayers { get; set; }
    public string Status { get; set; } = string.Empty;
    public string Creator { get; set; } = string.Empty;
    public DateTime CreatedAt { get; set; }
    public DateTime? StartTime { get; set; }
    public List<PlayerInfo> Players { get; set; } = new();
}

/// <summary>
/// 玩家信息
/// </summary>
public class PlayerInfo
{
    public Guid Id { get; set; }
    public string Username { get; set; } = string.Empty;
    public string Color { get; set; } = string.Empty;
    public int AreaCount { get; set; }
}

/// <summary>
/// 创建房间请求
/// </summary>
public class CreateRoomRequest
{
    public string RoomName { get; set; } = string.Empty;
    public int MaxPlayers { get; set; } = 4;
    // 新增：游戏时长（分钟）
    public int GameDuration { get; set; } = 2;
}

/// <summary>
/// 游戏结果
/// </summary>
public class GameResult
{
    public string RoomId { get; set; } = string.Empty;
    public PlayerInfo? Winner { get; set; }
    public List<PlayerInfo> Rankings { get; set; } = new();
    public int TotalArea { get; set; }
    public int GameDuration { get; set; }
    public DateTime EndTime { get; set; }
}
